<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>输出100内所有质数</title>
</head>
<body>
    <script>
        for(var i=2;i<=100;i++){
            var value=true;
            for(var j=2;j<i;j++){
                if(i%j==0) {
                value=false;
                break; } 
            } 
            if(value){
                document.write(i+"，");
            }
            
        }
    </script>
</body>
</html>